<?php
$this->pageTitle=Yii::app()->name . ' - Contact Us';

?>

<legend>联系我们</legend>


<?php if(Yii::app()->user->hasFlash('contact')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('contact'); ?>
</div>

<?php else: ?>

<p>
如果你有任何疑问或意见反馈，请填写下面的表单，并联系我们，非常感谢。
</p>

<?php /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id'=>'contact-form',
    'type'=>'horizontal',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
    ),
)); ?>
 
<?php echo $form->errorSummary($model); ?>
<?php echo $form->textFieldRow($model, 'name', array('class'=>'span3')); ?>
<?php echo $form->textFieldRow($model, 'email', array('class'=>'span3')); ?>
<?php echo $form->textFieldRow($model, 'subject', array('class'=>'span3')); ?>
<?php echo $form->textAreaRow($model, 'body', array('class'=>'span6', 'rows'=>5)); ?>
<div class="form-actions">
<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'icon'=>'ok', 'label'=>'提 交')); ?>
</div>
<?php $this->endWidget(); ?>
<?php endif; ?>
